package com.cskaoyan.app.wxcontroller;

import com.cskaoyan.app.bean.common.BaseRespVo;
import com.cskaoyan.app.bean.vo.wx.WxHomeIndexVO;
import com.cskaoyan.app.wxservice.WxHomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("wx/home")
public class WxHomeController {

    @Autowired
    private WxHomeService wxHomeService;

    @GetMapping("index")
    public Object index() {
        WxHomeIndexVO data = wxHomeService.index();
        return BaseRespVo.ok(data);
    }

    @GetMapping("about")
    public BaseRespVo<Object> about() {
        Map<String, String> data = wxHomeService.about();
        return BaseRespVo.ok(data);
    }
}
